<template>
  <div class="header">
    <div class="back" @click="back">
      <van-icon name="arrow-left" />
    </div>
    <p>{{ name }}</p>
  </div>
</template>

<script setup>
import { ref, defineProps } from "vue";
import { useRouter } from "vue-router";
const router = useRouter();
const back = () => {
  router.go(-1);
};
const names = defineProps({
  name: String,
});
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}

.header {
  width: 100%;
  height: 5rem;
  display: flex;
}

.back {
  width: 3rem;
  height: 3rem;
  border: 1px solid rgb(164, 163, 163);
  border-radius: 50%;
  font-size: 2rem;
  text-align: center;
  line-height: 3rem;
  margin-left: 5%;
  margin-top: 3%;
}

p {
  font-size: 1.3rem;
  margin-top: 5%;
  margin-left: 23%;
}
</style>